#include<iostream>
#include<string>
using namespace std;

int main()
{
    string s;
    int n=0,i,len;
    while(cin>>s&&s!="#")
    {
        n++;
        len=s.size();
        for(i=0;i<len;i++)
        if(i%2!=0) s[i] -=32;
        cout<<"Case "<<n<<": "<<s<<endl;
    }
    return 0;
}
